home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 12 / Cream of the Crop 12 (Part II) / Cream of the Crop 12 (Part II).iso / BBS / SENDFILE.ZIP / SENDFILE.MEX < prev    next >
Encoding:
Text File  |  1996-02-01  |  1.7 KB  |  49 lines

  1. //--------------------------------------------------------------------------//
  2. //                    SendFile v1.0 for Maximus v3                          //
  3. //                   by Chris Gerlinsky, 1:140/186                          //
  4. //                                                                          //
  5. // This MEX program is to be called in MENUS.CTL right before the           //
  6. // File_Download command.  If the user has not downloaded any files yet     //
  7. // (usr.ndown < 1), it will tag the file SEND_FILE, defined below..         //
  8. //                                                                          //
  9. // NoDsp MEX             M\SendFile              Demoted "Download"         //
  10. //       File_Download                           Demoted "Download"         //
  11. //                                                                          //
  12. // Remember that the filename in SEND_FILE must have all backslashes        //
  13. // escaped!  (ie: c:\pub\ = c:\\pub\\)                                      //
  14. //--------------------------------------------------------------------------//
  15.  
  16. #include <max.mh>
  17.  
  18.  
  19. // the file to send to the new downloader..  double backslashes!
  20.  
  21. #define SEND_FILE   "c:\\pub\\misc\\text\\lifefile.txt"
  22.  
  23.  
  24. void main()
  25. {
  26.     int: counter,flags;
  27.     string: filename,testfile;
  28.  
  29.     testfile:=SEND_FILE;
  30.  
  31.     if(usr.ndown<1)
  32.     {
  33.         for(counter=0;counter<tag_queue_size();counter:=counter+1)
  34.         {
  35.             tag_get_name(counter,flags,filename);
  36.             if(strlower(filename)=strlower(testfile))
  37.                 goto skipit;
  38.         }
  39.  
  40.         flags:=FFLAG_NOTIME|FFLAG_NOBYTES;
  41.         filename:=SEND_FILE;
  42.         tag_queue_file(filename,flags);
  43.     }
  44.  
  45.     skipit:
  46.  
  47.     return;
  48. }
  49.